home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / gcc.info-4 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  44.6 KB  |  1,122 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * gcc: (gcc).                  The GNU Compiler Collection.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU compiler.
  9.  
  10.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  11. Boston, MA 02111-1307 USA
  12.  
  13.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  14. 1999, 2000 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License" and "Funding
  23. for Free Software" are included exactly as in the original, and
  24. provided that the entire resulting derived work is distributed under
  25. the terms of a permission notice identical to this one.
  26.  
  27.    Permission is granted to copy and distribute translations of this
  28. manual into another language, under the above conditions for modified
  29. versions, except that the sections entitled "GNU General Public
  30. License" and "Funding for Free Software", and this permission notice,
  31. may be included in translations approved by the Free Software Foundation
  32. instead of in the original English.
  33.  
  34. 
  35. File: gcc.info,  Node: Directory Options,  Next: Target Options,  Prev: Link Options,  Up: Invoking GCC
  36.  
  37. Options for Directory Search
  38. ============================
  39.  
  40.    These options specify directories to search for header files, for
  41. libraries and for parts of the compiler:
  42.  
  43. `-IDIR'
  44.      Add the directory DIR to the head of the list of directories to be
  45.      searched for header files.  This can be used to override a system
  46.      header file, substituting your own version, since these
  47.      directories are searched before the system header file
  48.      directories.  If you use more than one `-I' option, the
  49.      directories are scanned in left-to-right order; the standard
  50.      system directories come after.
  51.  
  52. `-I-'
  53.      Any directories you specify with `-I' options before the `-I-'
  54.      option are searched only for the case of `#include "FILE"'; they
  55.      are not searched for `#include <FILE>'.
  56.  
  57.      If additional directories are specified with `-I' options after
  58.      the `-I-', these directories are searched for all `#include'
  59.      directives.  (Ordinarily *all* `-I' directories are used this way.)
  60.  
  61.      In addition, the `-I-' option inhibits the use of the current
  62.      directory (where the current input file came from) as the first
  63.      search directory for `#include "FILE"'.  There is no way to
  64.      override this effect of `-I-'.  With `-I.' you can specify
  65.      searching the directory which was current when the compiler was
  66.      invoked.  That is not exactly the same as what the preprocessor
  67.      does by default, but it is often satisfactory.
  68.  
  69.      `-I-' does not inhibit the use of the standard system directories
  70.      for header files.  Thus, `-I-' and `-nostdinc' are independent.
  71.  
  72. `-LDIR'
  73.      Add directory DIR to the list of directories to be searched for
  74.      `-l'.
  75.  
  76. `-BPREFIX'
  77.      This option specifies where to find the executables, libraries,
  78.      include files, and data files of the compiler itself.
  79.  
  80.      The compiler driver program runs one or more of the subprograms
  81.      `cpp', `cc1', `as' and `ld'.  It tries PREFIX as a prefix for each
  82.      program it tries to run, both with and without `MACHINE/VERSION/'
  83.      (*note Target Options::.).
  84.  
  85.      For each subprogram to be run, the compiler driver first tries the
  86.      `-B' prefix, if any.  If that name is not found, or if `-B' was
  87.      not specified, the driver tries two standard prefixes, which are
  88.      `/usr/lib/gcc/' and `/usr/local/lib/gcc-lib/'.  If neither of
  89.      those results in a file name that is found, the unmodified program
  90.      name is searched for using the directories specified in your
  91.      `PATH' environment variable.
  92.  
  93.      `-B' prefixes that effectively specify directory names also apply
  94.      to libraries in the linker, because the compiler translates these
  95.      options into `-L' options for the linker.  They also apply to
  96.      includes files in the preprocessor, because the compiler
  97.      translates these options into `-isystem' options for the
  98.      preprocessor.  In this case, the compiler appends `include' to the
  99.      prefix.
  100.  
  101.      The run-time support file `libgcc.a' can also be searched for using
  102.      the `-B' prefix, if needed.  If it is not found there, the two
  103.      standard prefixes above are tried, and that is all.  The file is
  104.      left out of the link if it is not found by those means.
  105.  
  106.      Another way to specify a prefix much like the `-B' prefix is to use
  107.      the environment variable `GCC_EXEC_PREFIX'.  *Note Environment
  108.      Variables::.
  109.  
  110. `-specs=FILE'
  111.      Process FILE after the compiler reads in the standard `specs'
  112.      file, in order to override the defaults that the `gcc' driver
  113.      program uses when determining what switches to pass to `cc1',
  114.      `cc1plus', `as', `ld', etc.  More than one `-specs='FILE can be
  115.      specified on the command line, and they are processed in order,
  116.      from left to right.
  117.  
  118. 
  119. File: gcc.info,  Node: Target Options,  Next: Submodel Options,  Prev: Directory Options,  Up: Invoking GCC
  120.  
  121. Specifying Target Machine and Compiler Version
  122. ==============================================
  123.  
  124.    By default, GCC compiles code for the same type of machine that you
  125. are using.  However, it can also be installed as a cross-compiler, to
  126. compile for some other type of machine.  In fact, several different
  127. configurations of GCC, for different target machines, can be installed
  128. side by side.  Then you specify which one to use with the `-b' option.
  129.  
  130.    In addition, older and newer versions of GCC can be installed side
  131. by side.  One of them (probably the newest) will be the default, but
  132. you may sometimes wish to use another.
  133.  
  134. `-b MACHINE'
  135.      The argument MACHINE specifies the target machine for compilation.
  136.      This is useful when you have installed GCC as a cross-compiler.
  137.  
  138.      The value to use for MACHINE is the same as was specified as the
  139.      machine type when configuring GCC as a cross-compiler.  For
  140.      example, if a cross-compiler was configured with `configure
  141.      i386v', meaning to compile for an 80386 running System V, then you
  142.      would specify `-b i386v' to run that cross compiler.
  143.  
  144.      When you do not specify `-b', it normally means to compile for the
  145.      same type of machine that you are using.
  146.  
  147. `-V VERSION'
  148.      The argument VERSION specifies which version of GCC to run.  This
  149.      is useful when multiple versions are installed.  For example,
  150.      VERSION might be `2.0', meaning to run GCC version 2.0.
  151.  
  152.      The default version, when you do not specify `-V', is the last
  153.      version of GCC that you installed.
  154.  
  155.    The `-b' and `-V' options actually work by controlling part of the
  156. file name used for the executable files and libraries used for
  157. compilation.  A given version of GCC, for a given target machine, is
  158. normally kept in the directory `/usr/local/lib/gcc-lib/MACHINE/VERSION'.
  159.  
  160.    Thus, sites can customize the effect of `-b' or `-V' either by
  161. changing the names of these directories or adding alternate names (or
  162. symbolic links).  If in directory `/usr/local/lib/gcc-lib/' the file
  163. `80386' is a link to the file `i386v', then `-b 80386' becomes an alias
  164. for `-b i386v'.
  165.  
  166.    In one respect, the `-b' or `-V' do not completely change to a
  167. different compiler: the top-level driver program `gcc' that you
  168. originally invoked continues to run and invoke the other executables
  169. (preprocessor, compiler per se, assembler and linker) that do the real
  170. work.  However, since no real work is done in the driver program, it
  171. usually does not matter that the driver program in use is not the one
  172. for the specified target and version.
  173.  
  174.    The only way that the driver program depends on the target machine is
  175. in the parsing and handling of special machine-specific options.
  176. However, this is controlled by a file which is found, along with the
  177. other executables, in the directory for the specified version and
  178. target machine.  As a result, a single installed driver program adapts
  179. to any specified target machine and compiler version.
  180.  
  181.    The driver program executable does control one significant thing,
  182. however: the default version and target machine.  Therefore, you can
  183. install different instances of the driver program, compiled for
  184. different targets or versions, under different names.
  185.  
  186.    For example, if the driver for version 2.0 is installed as `ogcc'
  187. and that for version 2.1 is installed as `gcc', then the command `gcc'
  188. will use version 2.1 by default, while `ogcc' will use 2.0 by default.
  189. However, you can choose either version with either command with the
  190. `-V' option.
  191.  
  192. 
  193. File: gcc.info,  Node: Submodel Options,  Next: Code Gen Options,  Prev: Target Options,  Up: Invoking GCC
  194.  
  195. Hardware Models and Configurations
  196. ==================================
  197.  
  198.    Earlier we discussed the standard option `-b' which chooses among
  199. different installed compilers for completely different target machines,
  200. such as Vax vs. 68000 vs. 80386.
  201.  
  202.    In addition, each of these target machine types can have its own
  203. special options, starting with `-m', to choose among various hardware
  204. models or configurations--for example, 68010 vs 68020, floating
  205. coprocessor or none.  A single installed version of the compiler can
  206. compile for any model or configuration, according to the options
  207. specified.
  208.  
  209.    Some configurations of the compiler also support additional special
  210. options, usually for compatibility with other compilers on the same
  211. platform.
  212.  
  213.    These options are defined by the macro `TARGET_SWITCHES' in the
  214. machine description.  The default for the options is also defined by
  215. that macro, which enables you to change the defaults.
  216.  
  217. * Menu:
  218.  
  219. * M680x0 Options::
  220. * VAX Options::
  221. * SPARC Options::
  222. * Convex Options::
  223. * AMD29K Options::
  224. * ARM Options::
  225. * Thumb Options::
  226. * MN10200 Options::
  227. * MN10300 Options::
  228. * M32R/D Options::
  229. * M88K Options::
  230. * RS/6000 and PowerPC Options::
  231. * RT Options::
  232. * MIPS Options::
  233. * i386 Options::
  234. * HPPA Options::
  235. * Intel 960 Options::
  236. * DEC Alpha Options::
  237. * Clipper Options::
  238. * H8/300 Options::
  239. * SH Options::
  240. * System V Options::
  241. * TMS320C3x/C4x Options::
  242. * V850 Options::
  243. * ARC Options::
  244. * NS32K Options::
  245.  
  246. 
  247. File: gcc.info,  Node: M680x0 Options,  Next: VAX Options,  Up: Submodel Options
  248.  
  249. M680x0 Options
  250. --------------
  251.  
  252.    These are the `-m' options defined for the 68000 series.  The default
  253. values for these options depends on which style of 68000 was selected
  254. when the compiler was configured; the defaults for the most common
  255. choices are given below.
  256.  
  257. `-m68000'
  258. `-mc68000'
  259.      Generate output for a 68000.  This is the default when the
  260.      compiler is configured for 68000-based systems.
  261.  
  262.      Use this option for microcontrollers with a 68000 or EC000 core,
  263.      including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
  264.  
  265. `-m68020'
  266. `-mc68020'
  267.      Generate output for a 68020.  This is the default when the
  268.      compiler is configured for 68020-based systems.
  269.  
  270. `-m68881'
  271.      Generate output containing 68881 instructions for floating point.
  272.      This is the default for most 68020 systems unless `-nfp' was
  273.      specified when the compiler was configured.
  274.  
  275. `-m68030'
  276.      Generate output for a 68030.  This is the default when the
  277.      compiler is configured for 68030-based systems.
  278.  
  279. `-m68040'
  280.      Generate output for a 68040.  This is the default when the
  281.      compiler is configured for 68040-based systems.
  282.  
  283.      This option inhibits the use of 68881/68882 instructions that have
  284.      to be emulated by software on the 68040.  Use this option if your
  285.      68040 does not have code to emulate those instructions.
  286.  
  287. `-m68060'
  288.      Generate output for a 68060.  This is the default when the
  289.      compiler is configured for 68060-based systems.
  290.  
  291.      This option inhibits the use of 68020 and 68881/68882 instructions
  292.      that have to be emulated by software on the 68060.  Use this
  293.      option if your 68060 does not have code to emulate those
  294.      instructions.
  295.  
  296. `-mcpu32'
  297.      Generate output for a CPU32. This is the default when the compiler
  298.      is configured for CPU32-based systems.
  299.  
  300.      Use this option for microcontrollers with a CPU32 or CPU32+ core,
  301.      including the 68330, 68331, 68332, 68333, 68334, 68336, 68340,
  302.      68341, 68349 and 68360.
  303.  
  304. `-m5200'
  305.      Generate output for a 520X "coldfire" family cpu.  This is the
  306.      default when the compiler is configured for 520X-based systems.
  307.  
  308.      Use this option for microcontroller with a 5200 core, including
  309.      the MCF5202, MCF5203, MCF5204 and MCF5202.
  310.  
  311. `-m68020-40'
  312.      Generate output for a 68040, without using any of the new
  313.      instructions.  This results in code which can run relatively
  314.      efficiently on either a 68020/68881 or a 68030 or a 68040.  The
  315.      generated code does use the 68881 instructions that are emulated
  316.      on the 68040.
  317.  
  318. `-m68020-60'
  319.      Generate output for a 68060, without using any of the new
  320.      instructions.  This results in code which can run relatively
  321.      efficiently on either a 68020/68881 or a 68030 or a 68040.  The
  322.      generated code does use the 68881 instructions that are emulated
  323.      on the 68060.
  324.  
  325. `-mfpa'
  326.      Generate output containing Sun FPA instructions for floating point.
  327.  
  328. `-msoft-float'
  329.      Generate output containing library calls for floating point.
  330.      *Warning:* the requisite libraries are not available for all m68k
  331.      targets.  Normally the facilities of the machine's usual C
  332.      compiler are used, but this can't be done directly in
  333.      cross-compilation.  You must make your own arrangements to provide
  334.      suitable library functions for cross-compilation.  The embedded
  335.      targets `m68k-*-aout' and `m68k-*-coff' do provide software
  336.      floating point support.
  337.  
  338. `-mshort'
  339.      Consider type `int' to be 16 bits wide, like `short int'.
  340.  
  341. `-mnobitfield'
  342.      Do not use the bit-field instructions.  The `-m68000', `-mcpu32'
  343.      and `-m5200' options imply `-mnobitfield'.
  344.  
  345. `-mbitfield'
  346.      Do use the bit-field instructions.  The `-m68020' option implies
  347.      `-mbitfield'.  This is the default if you use a configuration
  348.      designed for a 68020.
  349.  
  350. `-mrtd'
  351.      Use a different function-calling convention, in which functions
  352.      that take a fixed number of arguments return with the `rtd'
  353.      instruction, which pops their arguments while returning.  This
  354.      saves one instruction in the caller since there is no need to pop
  355.      the arguments there.
  356.  
  357.      This calling convention is incompatible with the one normally used
  358.      on Unix, so you cannot use it if you need to call libraries
  359.      compiled with the Unix compiler.
  360.  
  361.      Also, you must provide function prototypes for all functions that
  362.      take variable numbers of arguments (including `printf'); otherwise
  363.      incorrect code will be generated for calls to those functions.
  364.  
  365.      In addition, seriously incorrect code will result if you call a
  366.      function with too many arguments.  (Normally, extra arguments are
  367.      harmlessly ignored.)
  368.  
  369.      The `rtd' instruction is supported by the 68010, 68020, 68030,
  370.      68040, 68060 and CPU32 processors, but not by the 68000 or 5200.
  371.  
  372. `-malign-int'
  373. `-mno-align-int'
  374.      Control whether GCC aligns `int', `long', `long long', `float',
  375.      `double', and `long double' variables on a 32-bit boundary
  376.      (`-malign-int') or a 16-bit boundary (`-mno-align-int').  Aligning
  377.      variables on 32-bit boundaries produces code that runs somewhat
  378.      faster on processors with 32-bit busses at the expense of more
  379.      memory.
  380.  
  381.      *Warning:* if you use the `-malign-int' switch, GCC will align
  382.      structures containing the above types  differently than most
  383.      published application binary interface specifications for the m68k.
  384.  
  385. 
  386. File: gcc.info,  Node: VAX Options,  Next: SPARC Options,  Prev: M680x0 Options,  Up: Submodel Options
  387.  
  388. VAX Options
  389. -----------
  390.  
  391.    These `-m' options are defined for the Vax:
  392.  
  393. `-munix'
  394.      Do not output certain jump instructions (`aobleq' and so on) that
  395.      the Unix assembler for the Vax cannot handle across long ranges.
  396.  
  397. `-mgnu'
  398.      Do output those jump instructions, on the assumption that you will
  399.      assemble with the GNU assembler.
  400.  
  401. `-mg'
  402.      Output code for g-format floating point numbers instead of
  403.      d-format.
  404.  
  405. 
  406. File: gcc.info,  Node: SPARC Options,  Next: Convex Options,  Prev: VAX Options,  Up: Submodel Options
  407.  
  408. SPARC Options
  409. -------------
  410.  
  411.    These `-m' switches are supported on the SPARC:
  412.  
  413. `-mno-app-regs'
  414. `-mapp-regs'
  415.      Specify `-mapp-regs' to generate output using the global registers
  416.      2 through 4, which the SPARC SVR4 ABI reserves for applications.
  417.      This is the default.
  418.  
  419.      To be fully SVR4 ABI compliant at the cost of some performance
  420.      loss, specify `-mno-app-regs'.  You should compile libraries and
  421.      system software with this option.
  422.  
  423. `-mfpu'
  424. `-mhard-float'
  425.      Generate output containing floating point instructions.  This is
  426.      the default.
  427.  
  428. `-mno-fpu'
  429. `-msoft-float'
  430.      Generate output containing library calls for floating point.
  431.      *Warning:* the requisite libraries are not available for all SPARC
  432.      targets.  Normally the facilities of the machine's usual C
  433.      compiler are used, but this cannot be done directly in
  434.      cross-compilation.  You must make your own arrangements to provide
  435.      suitable library functions for cross-compilation.  The embedded
  436.      targets `sparc-*-aout' and `sparclite-*-*' do provide software
  437.      floating point support.
  438.  
  439.      `-msoft-float' changes the calling convention in the output file;
  440.      therefore, it is only useful if you compile *all* of a program with
  441.      this option.  In particular, you need to compile `libgcc.a', the
  442.      library that comes with GCC, with `-msoft-float' in order for this
  443.      to work.
  444.  
  445. `-mhard-quad-float'
  446.      Generate output containing quad-word (long double) floating point
  447.      instructions.
  448.  
  449. `-msoft-quad-float'
  450.      Generate output containing library calls for quad-word (long
  451.      double) floating point instructions.  The functions called are
  452.      those specified in the SPARC ABI.  This is the default.
  453.  
  454.      As of this writing, there are no sparc implementations that have
  455.      hardware support for the quad-word floating point instructions.
  456.      They all invoke a trap handler for one of these instructions, and
  457.      then the trap handler emulates the effect of the instruction.
  458.      Because of the trap handler overhead, this is much slower than
  459.      calling the ABI library routines.  Thus the `-msoft-quad-float'
  460.      option is the default.
  461.  
  462. `-mno-epilogue'
  463. `-mepilogue'
  464.      With `-mepilogue' (the default), the compiler always emits code for
  465.      function exit at the end of each function.  Any function exit in
  466.      the middle of the function (such as a return statement in C) will
  467.      generate a jump to the exit code at the end of the function.
  468.  
  469.      With `-mno-epilogue', the compiler tries to emit exit code inline
  470.      at every function exit.
  471.  
  472. `-mno-flat'
  473. `-mflat'
  474.      With `-mflat', the compiler does not generate save/restore
  475.      instructions and will use a "flat" or single register window
  476.      calling convention.  This model uses %i7 as the frame pointer and
  477.      is compatible with the normal register window model.  Code from
  478.      either may be intermixed.  The local registers and the input
  479.      registers (0-5) are still treated as "call saved" registers and
  480.      will be saved on the stack as necessary.
  481.  
  482.      With `-mno-flat' (the default), the compiler emits save/restore
  483.      instructions (except for leaf functions) and is the normal mode of
  484.      operation.
  485.  
  486. `-mno-unaligned-doubles'
  487. `-munaligned-doubles'
  488.      Assume that doubles have 8 byte alignment.  This is the default.
  489.  
  490.      With `-munaligned-doubles', GCC assumes that doubles have 8 byte
  491.      alignment only if they are contained in another type, or if they
  492.      have an absolute address.  Otherwise, it assumes they have 4 byte
  493.      alignment.  Specifying this option avoids some rare compatibility
  494.      problems with code generated by other compilers.  It is not the
  495.      default because it results in a performance loss, especially for
  496.      floating point code.
  497.  
  498. `-mv8'
  499. `-msparclite'
  500.      These two options select variations on the SPARC architecture.
  501.  
  502.      By default (unless specifically configured for the Fujitsu
  503.      SPARClite), GCC generates code for the v7 variant of the SPARC
  504.      architecture.
  505.  
  506.      `-mv8' will give you SPARC v8 code.  The only difference from v7
  507.      code is that the compiler emits the integer multiply and integer
  508.      divide instructions which exist in SPARC v8 but not in SPARC v7.
  509.  
  510.      `-msparclite' will give you SPARClite code.  This adds the integer
  511.      multiply, integer divide step and scan (`ffs') instructions which
  512.      exist in SPARClite but not in SPARC v7.
  513.  
  514.      These options are deprecated and will be deleted in a future GCC
  515.      release.  They have been replaced with `-mcpu=xxx'.
  516.  
  517. `-mcypress'
  518. `-msupersparc'
  519.      These two options select the processor for which the code is
  520.      optimised.
  521.  
  522.      With `-mcypress' (the default), the compiler optimizes code for the
  523.      Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx
  524.      series.  This is also appropriate for the older SparcStation 1, 2,
  525.      IPX etc.
  526.  
  527.      With `-msupersparc' the compiler optimizes code for the SuperSparc
  528.      cpu, as used in the SparcStation 10, 1000 and 2000 series. This
  529.      flag also enables use of the full SPARC v8 instruction set.
  530.  
  531.      These options are deprecated and will be deleted in a future GCC
  532.      release.  They have been replaced with `-mcpu=xxx'.
  533.  
  534. `-mcpu=CPU_TYPE'
  535.      Set the instruction set, register set, and instruction scheduling
  536.      parameters for machine type CPU_TYPE.  Supported values for
  537.      CPU_TYPE are `v7', `cypress', `v8', `supersparc', `sparclite',
  538.      `hypersparc', `sparclite86x', `f930', `f934', `sparclet',
  539.      `tsc701', `v9', and `ultrasparc'.
  540.  
  541.      Default instruction scheduling parameters are used for values that
  542.      select an architecture and not an implementation.  These are `v7',
  543.      `v8', `sparclite', `sparclet', `v9'.
  544.  
  545.      Here is a list of each supported architecture and their supported
  546.      implementations.
  547.  
  548.               v7:             cypress
  549.               v8:             supersparc, hypersparc
  550.               sparclite:      f930, f934, sparclite86x
  551.               sparclet:       tsc701
  552.               v9:             ultrasparc
  553.  
  554. `-mtune=CPU_TYPE'
  555.      Set the instruction scheduling parameters for machine type
  556.      CPU_TYPE, but do not set the instruction set or register set that
  557.      the option `-mcpu='CPU_TYPE would.
  558.  
  559.      The same values for `-mcpu='CPU_TYPE are used for `-mtune='
  560.      CPU_TYPE, though the only useful values are those that select a
  561.      particular cpu implementation: `cypress', `supersparc',
  562.      `hypersparc', `f930', `f934', `sparclite86x', `tsc701',
  563.      `ultrasparc'.
  564.  
  565. `-malign-loops=NUM'
  566.      Align loops to a 2 raised to a NUM byte boundary.  If
  567.      `-malign-loops' is not specified, the default is 2.
  568.  
  569. `-malign-jumps=NUM'
  570.      Align instructions that are only jumped to to a 2 raised to a NUM
  571.      byte boundary.  If `-malign-jumps' is not specified, the default
  572.      is 2.
  573.  
  574. `-malign-functions=NUM'
  575.      Align the start of functions to a 2 raised to NUM byte boundary.
  576.      If `-malign-functions' is not specified, the default is 2 if
  577.      compiling for 32 bit sparc, and 5 if compiling for 64 bit sparc.
  578.  
  579.    These `-m' switches are supported in addition to the above on the
  580. SPARCLET processor.
  581.  
  582. `-mlittle-endian'
  583.      Generate code for a processor running in little-endian mode.
  584.  
  585. `-mlive-g0'
  586.      Treat register `%g0' as a normal register.  GCC will continue to
  587.      clobber it as necessary but will not assume it always reads as 0.
  588.  
  589. `-mbroken-saverestore'
  590.      Generate code that does not use non-trivial forms of the `save' and
  591.      `restore' instructions.  Early versions of the SPARCLET processor
  592.      do not correctly handle `save' and `restore' instructions used with
  593.      arguments.  They correctly handle them used without arguments.  A
  594.      `save' instruction used without arguments increments the current
  595.      window pointer but does not allocate a new stack frame.  It is
  596.      assumed that the window overflow trap handler will properly handle
  597.      this case as will interrupt handlers.
  598.  
  599.    These `-m' switches are supported in addition to the above on SPARC
  600. V9 processors in 64 bit environments.
  601.  
  602. `-mlittle-endian'
  603.      Generate code for a processor running in little-endian mode.
  604.  
  605. `-m32'
  606. `-m64'
  607.      Generate code for a 32 bit or 64 bit environment.  The 32 bit
  608.      environment sets int, long and pointer to 32 bits.  The 64 bit
  609.      environment sets int to 32 bits and long and pointer to 64 bits.
  610.  
  611. `-mcmodel=medlow'
  612.      Generate code for the Medium/Low code model: the program must be
  613.      linked in the low 32 bits of the address space.  Pointers are 64
  614.      bits.  Programs can be statically or dynamically linked.
  615.  
  616. `-mcmodel=medmid'
  617.      Generate code for the Medium/Middle code model: the program must
  618.      be linked in the low 44 bits of the address space, the text
  619.      segment must be less than 2G bytes, and data segment must be
  620.      within 2G of the text segment.  Pointers are 64 bits.
  621.  
  622. `-mcmodel=medany'
  623.      Generate code for the Medium/Anywhere code model: the program may
  624.      be linked anywhere in the address space, the text segment must be
  625.      less than 2G bytes, and data segment must be within 2G of the text
  626.      segment.  Pointers are 64 bits.
  627.  
  628. `-mcmodel=embmedany'
  629.      Generate code for the Medium/Anywhere code model for embedded
  630.      systems: assume a 32 bit text and a 32 bit data segment, both
  631.      starting anywhere (determined at link time).  Register %g4 points
  632.      to the base of the data segment.  Pointers still 64 bits.
  633.      Programs are statically linked, PIC is not supported.
  634.  
  635. `-mstack-bias'
  636. `-mno-stack-bias'
  637.      With `-mstack-bias', GCC assumes that the stack pointer, and frame
  638.      pointer if present, are offset by -2047 which must be added back
  639.      when making stack frame references.  Otherwise, assume no such
  640.      offset is present.
  641.  
  642. 
  643. File: gcc.info,  Node: Convex Options,  Next: AMD29K Options,  Prev: SPARC Options,  Up: Submodel Options
  644.  
  645. Convex Options
  646. --------------
  647.  
  648.    These `-m' options are defined for Convex:
  649.  
  650. `-mc1'
  651.      Generate output for C1.  The code will run on any Convex machine.
  652.      The preprocessor symbol `__convex__c1__' is defined.
  653.  
  654. `-mc2'
  655.      Generate output for C2.  Uses instructions not available on C1.
  656.      Scheduling and other optimizations are chosen for max performance
  657.      on C2.  The preprocessor symbol `__convex_c2__' is defined.
  658.  
  659. `-mc32'
  660.      Generate output for C32xx.  Uses instructions not available on C1.
  661.      Scheduling and other optimizations are chosen for max performance
  662.      on C32.  The preprocessor symbol `__convex_c32__' is defined.
  663.  
  664. `-mc34'
  665.      Generate output for C34xx.  Uses instructions not available on C1.
  666.      Scheduling and other optimizations are chosen for max performance
  667.      on C34.  The preprocessor symbol `__convex_c34__' is defined.
  668.  
  669. `-mc38'
  670.      Generate output for C38xx.  Uses instructions not available on C1.
  671.      Scheduling and other optimizations are chosen for max performance
  672.      on C38.  The preprocessor symbol `__convex_c38__' is defined.
  673.  
  674. `-margcount'
  675.      Generate code which puts an argument count in the word preceding
  676.      each argument list.  This is compatible with regular CC, and a few
  677.      programs may need the argument count word.  GDB and other
  678.      source-level debuggers do not need it; this info is in the symbol
  679.      table.
  680.  
  681. `-mnoargcount'
  682.      Omit the argument count word.  This is the default.
  683.  
  684. `-mvolatile-cache'
  685.      Allow volatile references to be cached.  This is the default.
  686.  
  687. `-mvolatile-nocache'
  688.      Volatile references bypass the data cache, going all the way to
  689.      memory.  This is only needed for multi-processor code that does
  690.      not use standard synchronization instructions.  Making
  691.      non-volatile references to volatile locations will not necessarily
  692.      work.
  693.  
  694. `-mlong32'
  695.      Type long is 32 bits, the same as type int.  This is the default.
  696.  
  697. `-mlong64'
  698.      Type long is 64 bits, the same as type long long.  This option is
  699.      useless, because no library support exists for it.
  700.  
  701. 
  702. File: gcc.info,  Node: AMD29K Options,  Next: ARM Options,  Prev: Convex Options,  Up: Submodel Options
  703.  
  704. AMD29K Options
  705. --------------
  706.  
  707.    These `-m' options are defined for the AMD Am29000:
  708.  
  709. `-mdw'
  710.      Generate code that assumes the `DW' bit is set, i.e., that byte and
  711.      halfword operations are directly supported by the hardware.  This
  712.      is the default.
  713.  
  714. `-mndw'
  715.      Generate code that assumes the `DW' bit is not set.
  716.  
  717. `-mbw'
  718.      Generate code that assumes the system supports byte and halfword
  719.      write operations.  This is the default.
  720.  
  721. `-mnbw'
  722.      Generate code that assumes the systems does not support byte and
  723.      halfword write operations.  `-mnbw' implies `-mndw'.
  724.  
  725. `-msmall'
  726.      Use a small memory model that assumes that all function addresses
  727.      are either within a single 256 KB segment or at an absolute
  728.      address of less than 256k.  This allows the `call' instruction to
  729.      be used instead of a `const', `consth', `calli' sequence.
  730.  
  731. `-mnormal'
  732.      Use the normal memory model: Generate `call' instructions only when
  733.      calling functions in the same file and `calli' instructions
  734.      otherwise.  This works if each file occupies less than 256 KB but
  735.      allows the entire executable to be larger than 256 KB.  This is
  736.      the default.
  737.  
  738. `-mlarge'
  739.      Always use `calli' instructions.  Specify this option if you expect
  740.      a single file to compile into more than 256 KB of code.
  741.  
  742. `-m29050'
  743.      Generate code for the Am29050.
  744.  
  745. `-m29000'
  746.      Generate code for the Am29000.  This is the default.
  747.  
  748. `-mkernel-registers'
  749.      Generate references to registers `gr64-gr95' instead of to
  750.      registers `gr96-gr127'.  This option can be used when compiling
  751.      kernel code that wants a set of global registers disjoint from
  752.      that used by user-mode code.
  753.  
  754.      Note that when this option is used, register names in `-f' flags
  755.      must use the normal, user-mode, names.
  756.  
  757. `-muser-registers'
  758.      Use the normal set of global registers, `gr96-gr127'.  This is the
  759.      default.
  760.  
  761. `-mstack-check'
  762. `-mno-stack-check'
  763.      Insert (or do not insert) a call to `__msp_check' after each stack
  764.      adjustment.  This is often used for kernel code.
  765.  
  766. `-mstorem-bug'
  767. `-mno-storem-bug'
  768.      `-mstorem-bug' handles 29k processors which cannot handle the
  769.      separation of a mtsrim insn and a storem instruction (most 29000
  770.      chips to date, but not the 29050).
  771.  
  772. `-mno-reuse-arg-regs'
  773. `-mreuse-arg-regs'
  774.      `-mno-reuse-arg-regs' tells the compiler to only use incoming
  775.      argument registers for copying out arguments.  This helps detect
  776.      calling a function with fewer arguments than it was declared with.
  777.  
  778. `-mno-impure-text'
  779. `-mimpure-text'
  780.      `-mimpure-text', used in addition to `-shared', tells the compiler
  781.      to not pass `-assert pure-text' to the linker when linking a
  782.      shared object.
  783.  
  784. `-msoft-float'
  785.      Generate output containing library calls for floating point.
  786.      *Warning:* the requisite libraries are not part of GCC.  Normally
  787.      the facilities of the machine's usual C compiler are used, but
  788.      this can't be done directly in cross-compilation.  You must make
  789.      your own arrangements to provide suitable library functions for
  790.      cross-compilation.
  791.  
  792. `-mno-multm'
  793.      Do not generate multm or multmu instructions.  This is useful for
  794.      some embedded systems which do not have trap handlers for these
  795.      instructions.
  796.  
  797. 
  798. File: gcc.info,  Node: ARM Options,  Next: Thumb Options,  Prev: AMD29K Options,  Up: Submodel Options
  799.  
  800. ARM Options
  801. -----------
  802.  
  803.    These `-m' options are defined for Advanced RISC Machines (ARM)
  804. architectures:
  805.  
  806. `-mapcs-frame'
  807.      Generate a stack frame that is compliant with the ARM Procedure
  808.      Call Standard for all functions, even if this is not strictly
  809.      necessary for correct execution of the code.  Specifying
  810.      `-fomit-frame-pointer' with this option will cause the stack
  811.      frames not to be generated for leaf functions.  The default is
  812.      `-mno-apcs-frame'.
  813.  
  814. `-mapcs'
  815.      This is a synonym for `-mapcs-frame'.
  816.  
  817. `-mapcs-26'
  818.      Generate code for a processor running with a 26-bit program
  819.      counter, and conforming to the function calling standards for the
  820.      APCS 26-bit option.  This option replaces the `-m2' and `-m3'
  821.      options of previous releases of the compiler.
  822.  
  823. `-mapcs-32'
  824.      Generate code for a processor running with a 32-bit program
  825.      counter, and conforming to the function calling standards for the
  826.      APCS 32-bit option.  This option replaces the `-m6' option of
  827.      previous releases of the compiler.
  828.  
  829. `-mapcs-stack-check'
  830.      Generate code to check the amount of stack space available upon
  831.      entry to every function (that actually uses some stack space).  If
  832.      there is insufficient space available then either the function
  833.      `__rt_stkovf_split_small' or `__rt_stkovf_split_big' will be
  834.      called, depending upon the amount of stack space required.  The
  835.      run time system is required to provide these functions.  The
  836.      default is `-mno-apcs-stack-check', since this produces smaller
  837.      code.
  838.  
  839. `-mapcs-float'
  840.      Pass floating point arguments using the float point registers.
  841.      This is one of the variants of the APCS.  This option is
  842.      reccommended if the target hardware has a floating point unit or
  843.      if a lot of floating point arithmetic is going to be performed by
  844.      the code.  The default is `-mno-apcs-float', since integer only
  845.      code is slightly increased in size if `-mapcs-float' is used.
  846.  
  847. `-mapcs-reentrant'
  848.      Generate reentrant, position independent code.  This is the
  849.      equivalent to specifying the `-fpic' option.  The default is
  850.      `-mno-apcs-reentrant'.
  851.  
  852. `-mthumb-interwork'
  853.      Generate code which supports calling between the ARM and THUMB
  854.      instruction sets.  Without this option the two instruction sets
  855.      cannot be reliably used inside one program.  The default is
  856.      `-mno-thumb-interwork', since slightly larger code is generated
  857.      when `-mthumb-interwork' is specified.
  858.  
  859. `-mno-sched-prolog'
  860.      Prevent the reordering of instructions in the function prolog, or
  861.      the merging of those instruction with the instructions in the
  862.      function's body.  This means that all functions will start with a
  863.      recognisable set of instructions (or in fact one of a chioce from
  864.      a small set of different function prologues), and this information
  865.      can be used to locate the start if functions inside an executable
  866.      piece of code.  The default is `-msched-prolog'.
  867.  
  868. `-mhard-float'
  869.      Generate output containing floating point instructions.  This is
  870.      the default.
  871.  
  872. `-msoft-float'
  873.      Generate output containing library calls for floating point.
  874.      *Warning:* the requisite libraries are not available for all ARM
  875.      targets.  Normally the facilities of the machine's usual C
  876.      compiler are used, but this cannot be done directly in
  877.      cross-compilation.  You must make your own arrangements to provide
  878.      suitable library functions for cross-compilation.
  879.  
  880.      `-msoft-float' changes the calling convention in the output file;
  881.      therefore, it is only useful if you compile *all* of a program with
  882.      this option.  In particular, you need to compile `libgcc.a', the
  883.      library that comes with GCC, with `-msoft-float' in order for this
  884.      to work.
  885.  
  886. `-mlittle-endian'
  887.      Generate code for a processor running in little-endian mode.  This
  888.      is the default for all standard configurations.
  889.  
  890. `-mbig-endian'
  891.      Generate code for a processor running in big-endian mode; the
  892.      default is to compile code for a little-endian processor.
  893.  
  894. `-mwords-little-endian'
  895.      This option only applies when generating code for big-endian
  896.      processors.  Generate code for a little-endian word order but a
  897.      big-endian byte order.  That is, a byte order of the form
  898.      `32107654'.  Note: this option should only be used if you require
  899.      compatibility with code for big-endian ARM processors generated by
  900.      versions of the compiler prior to 2.8.
  901.  
  902. `-mshort-load-bytes'
  903.      Do not try to load half-words (eg `short's) by loading a word from
  904.      an unaligned address.  For some targets the MMU is configured to
  905.      trap unaligned loads; use this option to generate code that is
  906.      safe in these environments.
  907.  
  908. `-mno-short-load-bytes'
  909.      Use unaligned word loads to load half-words (eg `short's).  This
  910.      option produces more efficient code, but the MMU is sometimes
  911.      configured to trap these instructions.
  912.  
  913. `-mshort-load-words'
  914.      This is a synonym for the `-mno-short-load-bytes'.
  915.  
  916. `-mno-short-load-words'
  917.      This is a synonym for the `-mshort-load-bytes'.
  918.  
  919. `-mbsd'
  920.      This option only applies to RISC iX.  Emulate the native BSD-mode
  921.      compiler.  This is the default if `-ansi' is not specified.
  922.  
  923. `-mxopen'
  924.      This option only applies to RISC iX.  Emulate the native
  925.      X/Open-mode compiler.
  926.  
  927. `-mno-symrename'
  928.      This option only applies to RISC iX.  Do not run the assembler
  929.      post-processor, `symrename', after code has been assembled.
  930.      Normally it is necessary to modify some of the standard symbols in
  931.      preparation for linking with the RISC iX C library; this option
  932.      suppresses this pass.  The post-processor is never run when the
  933.      compiler is built for cross-compilation.
  934.  
  935. `-mcpu=<name>'
  936. `-mtune=<name>'
  937.      This specifies the name of the target ARM processor.  GCC uses
  938.      this name to determine what kind of instructions it can use when
  939.      generating assembly code.  Permissable names are: arm2, arm250,
  940.      arm3, arm6, arm60, arm600, arm610, arm620, arm7, arm7m, arm7d,
  941.      arm7dm, arm7di, arm7dmi, arm70, arm700, arm700i, arm710, arm710c,
  942.      arm7100, arm7500, arm7500fe, arm7tdmi, arm8, strongarm,
  943.      strongarm110, strongarm1100, arm8, arm810, arm9, arm9tdmi.
  944.      `-mtune=' is a synonym for `-mcpue=' to support older versions of
  945.      GCC.
  946.  
  947. `-march=<name>'
  948.      This specifies the name of the target ARM architecture.  GCC uses
  949.      this name to determine what kind of instructions it can use when
  950.      generating assembly code.  This option can be used in conjunction
  951.      with or instead of the `-mcpu=' option.  Permissable names are:
  952.      armv2, armv2a, armv3, armv3m, armv4, armv4t
  953.  
  954. `-mfpe=<number>'
  955. `-mfp=<number>'
  956.      This specifes the version of the floating point emulation
  957.      available on the target.  Permissable values are 2 and 3.  `-mfp='
  958.      is a synonym for `-mfpe=' to support older versions of GCC.
  959.  
  960. `-mstructure-size-boundary=<n>'
  961.      The size of all structures and unions will be rounded up to a
  962.      multiple of the number of bits set by this option.  Permissable
  963.      values are 8 and 32.  The default value varies for different
  964.      toolchains.  For the COFF targeted toolchain the default value is
  965.      8.  Specifying the larger number can produced faster, more
  966.      efficient code, but can also increase the size of the program.
  967.      The two values are potentially incompatible.  Code compiled with
  968.      one value cannot necessarily expect to work with code or libraries
  969.      compiled with the other value, if they exchange information using
  970.      structures or unions.  Programmers are encouraged to use the 32
  971.      value as future versions of the toolchain may default to this
  972.      value.
  973.  
  974. `-mabort-on-noreturn'
  975.      Generate a call to the function abort at the end of a noreturn
  976.      function.  It will be executed if the function tries to return.
  977.  
  978. 
  979. File: gcc.info,  Node: Thumb Options,  Next: MN10200 Options,  Prev: ARM Options,  Up: Submodel Options
  980.  
  981. Thumb Options
  982. -------------
  983.  
  984. `-mthumb-interwork'
  985.      Generate code which supports calling between the THUMB and ARM
  986.      instruction sets.  Without this option the two instruction sets
  987.      cannot be reliably used inside one program.  The default is
  988.      `-mno-thumb-interwork', since slightly smaller code is generated
  989.      with this option.
  990.  
  991. `-mtpcs-frame'
  992.      Generate a stack frame that is compliant with the Thumb Procedure
  993.      Call Standard for all non-leaf functions.  (A leaf function is one
  994.      that does not call any other functions).  The default is
  995.      `-mno-apcs-frame'.
  996.  
  997. `-mtpcs-leaf-frame'
  998.      Generate a stack frame that is compliant with the Thumb Procedure
  999.      Call Standard for all leaf functions.  (A leaf function is one
  1000.      that does not call any other functions).  The default is
  1001.      `-mno-apcs-leaf-frame'.
  1002.  
  1003. `-mlittle-endian'
  1004.      Generate code for a processor running in little-endian mode.  This
  1005.      is the default for all standard configurations.
  1006.  
  1007. `-mbig-endian'
  1008.      Generate code for a processor running in big-endian mode.
  1009.  
  1010. `-mstructure-size-boundary=<n>'
  1011.      The size of all structures and unions will be rounded up to a
  1012.      multiple of the number of bits set by this option.  Permissable
  1013.      values are 8 and 32.  The default value varies for different
  1014.      toolchains.  For the COFF targeted toolchain the default value is
  1015.      8.  Specifying the larger number can produced faster, more
  1016.      efficient code, but can also increase the size of the program.
  1017.      The two values are potentially incompatible.  Code compiled with
  1018.      one value cannot necessarily expect to work with code or libraries
  1019.      compiled with the other value, if they exchange information using
  1020.      structures or unions.  Programmers are encouraged to use the 32
  1021.      value as future versions of the toolchain may default to this
  1022.      value.
  1023.  
  1024. 
  1025. File: gcc.info,  Node: MN10200 Options,  Next: MN10300 Options,  Prev: Thumb Options,  Up: Submodel Options
  1026.  
  1027. MN10200 Options
  1028. ---------------
  1029.  
  1030.    These `-m' options are defined for Matsushita MN10200 architectures:
  1031. `-mrelax'
  1032.      Indicate to the linker that it should perform a relaxation
  1033.      optimization pass to shorten branches, calls and absolute memory
  1034.      addresses.  This option only has an effect when used on the
  1035.      command line for the final link step.
  1036.  
  1037.      This option makes symbolic debugging impossible.
  1038.  
  1039. 
  1040. File: gcc.info,  Node: MN10300 Options,  Next: M32R/D Options,  Prev: MN10200 Options,  Up: Submodel Options
  1041.  
  1042. MN10300 Options
  1043. ---------------
  1044.  
  1045.    These `-m' options are defined for Matsushita MN10300 architectures:
  1046.  
  1047. `-mmult-bug'
  1048.      Generate code to avoid bugs in the multiply instructions for the
  1049.      MN10300 processors.  This is the default.
  1050.  
  1051. `-mno-mult-bug'
  1052.      Do not generate code to avoid bugs in the multiply instructions
  1053.      for the MN10300 processors.
  1054.  
  1055. `-mrelax'
  1056.      Indicate to the linker that it should perform a relaxation
  1057.      optimization pass to shorten branches, calls and absolute memory
  1058.      addresses.  This option only has an effect when used on the
  1059.      command line for the final link step.
  1060.  
  1061.      This option makes symbolic debugging impossible.
  1062.  
  1063. 
  1064. File: gcc.info,  Node: M32R/D Options,  Next: M88K Options,  Prev: MN10300 Options,  Up: Submodel Options
  1065.  
  1066. M32R/D Options
  1067. --------------
  1068.  
  1069.    These `-m' options are defined for Mitsubishi M32R/D architectures:
  1070.  
  1071. `-mcode-model=small'
  1072.      Assume all objects live in the lower 16MB of memory (so that their
  1073.      addresses can be loaded with the `ld24' instruction), and assume
  1074.      all subroutines are reachable with the `bl' instruction.  This is
  1075.      the default.
  1076.  
  1077.      The addressability of a particular object can be set with the
  1078.      `model' attribute.
  1079.  
  1080. `-mcode-model=medium'
  1081.      Assume objects may be anywhere in the 32 bit address space (the
  1082.      compiler will generate `seth/add3' instructions to load their
  1083.      addresses), and assume all subroutines are reachable with the `bl'
  1084.      instruction.
  1085.  
  1086. `-mcode-model=large'
  1087.      Assume objects may be anywhere in the 32 bit address space (the
  1088.      compiler will generate `seth/add3' instructions to load their
  1089.      addresses), and assume subroutines may not be reachable with the
  1090.      `bl' instruction (the compiler will generate the much slower
  1091.      `seth/add3/jl' instruction sequence).
  1092.  
  1093. `-msdata=none'
  1094.      Disable use of the small data area.  Variables will be put into
  1095.      one of `.data', `bss', or `.rodata' (unless the `section'
  1096.      attribute has been specified).  This is the default.
  1097.  
  1098.      The small data area consists of sections `.sdata' and `.sbss'.
  1099.      Objects may be explicitly put in the small data area with the
  1100.      `section' attribute using one of these sections.
  1101.  
  1102. `-msdata=sdata'
  1103.      Put small global and static data in the small data area, but do not
  1104.      generate special code to reference them.
  1105.  
  1106. `-msdata=use'
  1107.      Put small global and static data in the small data area, and
  1108.      generate special instructions to reference them.
  1109.  
  1110. `-G NUM'
  1111.      Put global and static objects less than or equal to NUM bytes into
  1112.      the small data or bss sections instead of the normal data or bss
  1113.      sections.  The default value of NUM is 8.  The `-msdata' option
  1114.      must be set to one of `sdata' or `use' for this option to have any
  1115.      effect.
  1116.  
  1117.      All modules should be compiled with the same `-G NUM' value.
  1118.      Compiling with different values of NUM may or may not work; if it
  1119.      doesn't the linker will give an error message - incorrect code
  1120.      will not be generated.
  1121.  
  1122.